/*
 * Copyright (c) 2018. paascloud.net All Rights Reserved.
 * 项目名称：paascloud快速搭建企业级分布式微服务平台
 * 类名称：OmcOrderFeignApi.java
 * 创建人：刘兆明
 * 联系方式：paascloud.net@gmail.com
 * 开源地址: https://github.com/paascloud
 * 博客地址: http://blog.paascloud.net
 * 项目官网: http://paascloud.net
 */

package com.csun.cmny.provider.service;

import com.csun.cmny.base.dto.LoginAuthDto;
import com.csun.cmny.provider.model.dto.*;
import com.csun.cmny.provider.model.vo.CacOldManVo;
import com.csun.cmny.provider.model.vo.OldmanBedRoomBuildingVo;
import com.csun.cmny.provider.model.vo.PointCardAccountVO;
import com.csun.cmny.provider.model.vo.nursing.NursingGroupOldmanVo;
import com.csun.cmny.provider.model.vo.nursing.NursingGroupRoomVo;
import com.csun.cmny.provider.model.vo.nursing.NursingGroupUserVo;
import com.csun.cmny.provider.service.hystrix.OmcOldmanFeignHystrix;
import com.csun.cmny.security.feign.OAuth2FeignAutoConfiguration;
import com.csun.cmny.util.wrapper.Wrapper;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * The interface Omc order feign api.
 *
 * @author paascloud.net @gmail.com
 */
@FeignClient(value = "cmny-provider-omc", configuration = OAuth2FeignAutoConfiguration.class, fallback = OmcOldmanFeignHystrix.class)
public interface OmcOldmanFeignApi {
	/**
	 *
	 * @param  homeId
	 *
	 * @return the wrapper
	 */
	@PostMapping(value = "/api/oldman/getCheckinByHomeId")
	Wrapper getCheckinByHomeId(Integer homeId);

	/**
	 *
	 * @param
	 *
	 * @return the wrapper
	 */
	@PostMapping(value = "/api/oldman/checkOldmanbelong")
	Wrapper checkOldmanbelong(OldmanRpcDto oldmanRpcDto);

	@PostMapping(value = "/api/oldman/queryOldmanBedRoomBuildingByOldmanId")
    Wrapper<OldmanBedRoomBuildingVo> queryOldmanBedRoomBuildingByOldmanId(@RequestParam("oldmanId") Integer oldmanId);

	@PostMapping(value = "/api/oldman/queryOldmanBedRoomBuildingByBedId")
	Wrapper<OldmanBedRoomBuildingVo> queryOldmanBedRoomBuildingByBedId(@RequestParam("bedId") Integer bedId);

	@PostMapping(value = "/api/oldman/showCacOldMan")
	Wrapper<List<CacOldManVo>> showCacOldMan(@RequestBody OmcOldManDto omcOldManDto);

	/**
	 * query oldman special case by oldman id
	 *
	 * @param oldmanId the oldman id
	 *
	 * @return the oldman special case
	 */
	@PostMapping(value = "/api/oldman/queryOldmanSpecialCaseByOldmanId")
    Wrapper<String> queryOldmanSpecialCaseByOldmanId(@RequestParam("oldmanId") Integer oldmanId);

	/**
	 * query nursing group user by user id
	 *
	 * @param userId	the user id
	 *
	 * @return	the nursing group user vo
	 */
	@PostMapping(value = "/api/oldman/queryNursingGroupUserByUserId")
    Wrapper<NursingGroupUserVo> queryNursingGroupUserByUserId(@RequestParam("userId") Long userId);

	/**
	 * query nursing group room by room id
	 *
	 * @param roomId	the room id
	 *
	 * @return	the nursing group room vo
	 */
	@PostMapping(value = "/api/oldman/queryNursingGroupRoomByRoomId")
	Wrapper<NursingGroupRoomVo> queryNursingGroupRoomByRoomId(@RequestParam("roomId") Integer roomId);

	/**
	 * query nursing group oldman by oldman id
	 *
	 * @param oldmanId	the oldman id
	 *
	 * @return		the nursing grouo oldman vo
	 */
	@PostMapping(value = "/api/oldman/queryNursingGroupOldmanByOldmanId")
    Wrapper<NursingGroupOldmanVo> queryNursingGroupOldmanByOldmanId(@RequestParam("oldmanId") Integer oldmanId);

	/**
	 * 根据评估记录修改omc上老人评估等级
	 * @param: [cacOldmanDto]
	 * @return: com.csun.cmny.util.wrapper.Wrapper<java.lang.Integer>
	 */
	@PostMapping(value = "/api/oldman/updateOldmanByEvaluate")
    Wrapper<Integer> updateOldmanByEvaluate(@RequestBody CacOldmanDto cacOldmanDto);

	@PostMapping(value = "/api/oldman/oldmanAnalysisCalc")
	Wrapper oldmanAnalysisCalc();

	@PostMapping(value = "/api/oldman/batchCreateBill")
	Wrapper batchCreateBill(@RequestParam("date") String date);

	@PostMapping(value = "/api/oldman/syncAlertMsgToShiftLog")
    Wrapper<Integer> syncAlertMsgToShiftLog(@RequestBody DeviceAlertDto dto);

	@PostMapping(value = "/api/oldman/selectOldByRoomId")
	Wrapper<Long> selectOldByRoomId(@RequestParam(name = "roomId") Long roomId);

	@PostMapping(value = "/api/oldman/listPointCardAccount")
	Wrapper<List<PointCardAccountVO>> listPointCardAccount(@RequestBody PointCardAccountQueryDto dto);

	@PostMapping(value = "/api/oldman/addPointCardAccount")
	Wrapper<Integer> addPointCardAccount(@RequestBody PointCardAccountDto dto);

	@PostMapping(value = "/api/oldman/deletePointCardAccount")
	Wrapper<Integer> deletePointCardAccount(@RequestParam(name = "deviceId") Long deviceId);

	@PostMapping(value = "/api/oldman/selectStaffIdBySpecialist")
    Wrapper<List<Long>> selectStaffIdBySpecialist();

	@PostMapping(value = "/api/oldman/selectHaveUnfinishedOrderNumbers")
    Wrapper<Integer> selectHaveUnfinishedOrderNumbers(@RequestParam(name = "userId") Long userId);

	@PostMapping(value = "/api/oldman/isSpecialist")
    Wrapper<Integer> isSpecialist(@RequestParam(name = "id")Long id);
}
